package com.example.mytest;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener{

	DropLayout fl;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Button text=(Button) findViewById(R.id.text);
		text.setOnClickListener(this);
		
		fl=(DropLayout) findViewById(R.id.favor);
		fl.setOnClickListener(this);
		
	}

	@SuppressLint("NewApi")
    @Override
	public void onClick(final View v) {
		// TODO Auto-generated method stub
		Intent intent = new Intent();   
		intent.setData(Uri.parse("videogo://com.videogo/searchItem?name=C6"));
		startActivity(intent);
	    /*switch(v.getId()){
	        case R.id.favor:
	            fl.addDrop();
	            break;
	        case R.id.text:
	            //ObjectAnimator anim=ObjectAnimator.ofFloat(v, View.SCALE_X, 1f,2f);
	            ObjectAnimator anim=ObjectAnimator.ofInt(new ViewWrapper(v), "width", 100,500).setDuration(3000);
	            anim.start();
	            
	            ValueAnimator anim=ValueAnimator.ofObject(new BigEvaluator(), 300,500);
	            anim.addUpdateListener(new AnimatorUpdateListener() {
                    
                    @Override
                    public void onAnimationUpdate(ValueAnimator animation) {
                        // TODO Auto-generated method stub
                        int width=(Integer) animation.getAnimatedValue();
                        v.getLayoutParams().width=width;
                        v.requestLayout();
                    }
                });
	            anim.setDuration(3000);
	            anim.setTarget(v);
	            anim.start();
	            break;
	    }*/
	}

	
	class ViewWrapper{
	    
	    private View v;
	    
	    public ViewWrapper(View view) {
            // TODO Auto-generated constructor stub
	        v=view;
	    }
	    
	    public void setWidth(int pixels){
	        
	        v.getLayoutParams().width=pixels;
	        v.requestLayout();
	        
	    }
	    
	    public int getWidth(){
	        
	        return v.getLayoutParams().width;
	        
	    }
	    
	    
	}
	

}
